package com.cg.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cg.dao.BusinessDocDao;
import com.cg.entity.BusinessDoc;
import com.cg.utils.R;


@Service("businessDocServiceImpl")
public class BusinessDocServiceImpl {
	
	
	@Autowired
	BusinessDocDao businessDocDao;
	
	public List<BusinessDoc> queryList(Map<String, Object> params){
		
		return businessDocDao.queryList(params);
	}
	
	public R save(BusinessDoc doc){
		businessDocDao.save(doc);
		return R.ok();
	}
	
	public int queryTotal(Map<String,Object> query) {
		
		return businessDocDao.queryTotal();
	}
	
	public R update(BusinessDoc doc){
		businessDocDao.update(doc);
		return R.ok();
	}
	
	public void deleteBatch(Long[] ids) {
		businessDocDao.deleteBatch(ids);
	}

	
	public BusinessDoc queryObject(Long id) {
		return businessDocDao.queryObject(id);
	}

}
